package com.ljx.config;

/**
 * Company: 上海数惠系统技术有限公司
 * Department: 数据中心：研发二部
 * Date: 2021/04/12 09:07
 *
 * @Author: Ljxpa
 * Email: lujx@dist.com.cn
 * Desc:
 */
public enum DatasourceTypeEnum {

	READ("read"),
	WRITE("write");

	String code;

	DatasourceTypeEnum(String code) {
		this.code = code;
	}

	String getCode() {
		return this.code;
	}

	public static DatasourceTypeEnum getByCode(String code) {
		for (DatasourceTypeEnum value : DatasourceTypeEnum.values()) {
			if (value.code.equals(code)) {
				return value;
			}
		}
		return null;
	}
}
